<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header('')"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-files-edit" th:object="${files}">
        <input id="fileId" name="fileId" th:field="*{fileId}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">文件：</label>
            <div class="col-sm-8">
                <input id="fileName" name="fileName" th:field="*{fileName}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">状态：</label>
            <div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
                <input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}"
                       th:field="*{status}">
                <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">文件类型：</label>
            <div class="radio-box" th:each="dict : ${@dict.getType('sys_file_type')}">
                <input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}"
                       th:field="*{type}">
                <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">类型：</label>
            <div class="col-sm-8">
                <input id="type" name="type" th:field="*{type}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "system/files"
    $("#form-files-edit").validate({
        rules: {
            xxxx: {
                required: true,
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-files-edit').serialize());
        }
    }
</script>
</body>
</html>
